package com.pilhun.parser;

import java.util.Map;

public class GenericXmlApplicationContextImpl implements GenericXmlApplicationContext {
	private final XmlBeanDefinitionReaderImpl reader;
	
	
	public GenericXmlApplicationContextImpl(XmlBeanDefinitionReaderImpl reader) {
		this.reader = reader;
	}

	public void setValidating(boolean validating) {
		reader.setValidating(validating);
		
	}

	public void setParserType(ParserTypes parserType) {
		reader.setParserType(parserType);
		
	}
	
	public void load(String XMLFileLocation) {
		reader.loadBeanDefinitions(XMLFileLocation);
	}
	Map<String, BeanObj> createBeanMap(){
		return reader.createBeanMap();
	}
	
	public BeanFactory getBeanFactory() {
		return new BeanFactoryImpl(createBeanMap());
	}

	

}
